<extend name="Common:base" />

<block name="title"><title>{$product.title} - 爱读书店</title></block>

<block name="stylesheet">
<link rel="stylesheet" href="__CSS__/common.css" id="colors">
<link rel="stylesheet" href="__CSS__/review.css" id="colors">
</block>

<block name="javascript">
<script src="__JS__/cart.js"></script>
<script src="__JS__/review.js"></script>
</block>

<block name="breadcrumbs">
<!-- Titlebar -->
<section class="titlebar">
  <div class="container">
    <div class="sixteen columns">
      <h2>{$product.title}</h2>

      <nav id="breadcrumbs">
        <ul>
          <li><a href="{:U('Index/index')}">首页</a></li>
          <li><a href="{:U('Product/index')}">全部商品</a></li>
          <li>{$product.title}</li>
        </ul>
      </nav>

    </div>
  </div>
</section>
</block>

<block name="main-content">

<!-- Container -->
<div class="container">
  <!-- Slider -->
  <div class="eight columns" >
    <div class="slider-padding">
      <div id="product-slider-vertical" class="royalSlider rsDefault">
        <foreach name="cover_list" item="cover">
        <a href="__PUBLIC__/Book_img/{$product.bid}/{$cover}" class="mfp-gallery" title="封面">
          <img class="rsImg" src="__PUBLIC__/Book_img/{$product.bid}/{$cover}" data-rsTmb="__PUBLIC__/Book_img/{$product.bid}/{$cover}" />
        </a>
        </foreach>
      </div>
      <div class="clearfix"></div>
    </div>
  </div>


  <!-- Content -->
  <div class="eight columns">
    <div class="product-page">

      <!-- Headline -->
      <section class="title">
        <h2>{$product.title}</h2>
        <span class="product-price">¥{$product.price}</span>
      </section>

      <!-- Text Parapgraph -->
      <section>
        <p class="margin-reset">
        {$product.brief|htmlspecialchars_decode}
        </p>

        <!-- Share Buttons -->	
        <div class="share-buttons">
          <ul>
            <li><a href="#">Share</a></li>
            <li class="share-facebook"><a href="#">Facebook</a></li>
            <li class="share-twitter"><a href="#">Twitter</a></li>
            <li class="share-gplus"><a href="#">Google Plus</a></li>
            <li class="share-pinit"><a href="#">Pin It</a></li>
          </ul>
        </div>
        <div class="clearfix"></div>

      </section>


      <section class="linking">

        <form action='#'>
          <div class="qtyminus"></div>
          <input type='text' name="quantity" value='1' class="qty" />
          <div class="qtyplus"></div>
        </form>

        <a href="javascript:void(0)" addCartUrl="{:U('Cart/add', array('bid' => $product['bid']), '')}" class="button adc addCart">加入购物车</a>
        <div class="clearfix"></div>

      </section>

    </div>
  </div>

</div>


<div class="container">
  <div class="sixteen columns">
    <!-- Tabs Navigation -->
    <ul class="tabs-nav">
      <li class="active"><a href="#description_tab">商品详情</a></li>
      <li><a href="#parameter_tab">参数</a></li>
      <li><a href="#review_tab">评论 <span class="tab-reviews">({$review|count})</span></a></li>
    </ul>

    <!-- Tabs Content -->
    <div class="tabs-container">

      <div class="tab-content" id="description_tab">
        <p>{$product.description|htmlspecialchars_decode}</p>
      </div>

      <div class="tab-content" id="parameter_tab">

        <table class="basic-table">
          <tr>
            <th>书名</th>
            <td>{$product.title}</td>
          </tr>

          <tr>
            <th>外文书名</th>
            <td>{$product.title_en}</td>
          </tr>

          <tr>
            <th>作者</th>
            <td>
              <foreach name="product.author" item="a">
              <if condition="$a['author_role'] == 1">
              [{$a.nation_remark}] {$a.author_name} &nbsp;&nbsp;&nbsp;&nbsp;
              </if>
              </foreach>
            </td>
          </tr>
          <tr>
            <th>译者</th>
            <td>
              <foreach name="product.author" item="a">
              <if condition="$a['author_role'] == 2">
              [{$a.nation_remark}] {$a.author_name} &nbsp;&nbsp;&nbsp;&nbsp;
              </if>
              </foreach>
            </td>
          </tr>
          <tr>
            <th>出版社</th>
            <td>{$product.publisher}</td>
          </tr>
          <tr>
            <th>ISBN</th>
            <td>{$product.isbn}</td>
          </tr>
          <tr>
            <th>定价</th>
            <td>¥{$product.price}</td>
          </tr>
        </table>

      </div>

      <div class="tab-content" id="review_tab">
        <include file="Product:make-review" />
      </div>

    </div>
  </div>
</div>

<include file="Product:related-products" />

</block>
